/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.uit.ecommerce.services;

import com.uit.ecommerce.bo.NewsBO;
import com.uit.ecommerce.dto.NewsDTO;
import java.util.ArrayList;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 *
 * @author Ultimate
 */
@WebService()
public class ServiceNews {

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getAllNews")
    public ArrayList<NewsDTO> getAllNews() throws Exception {
       NewsBO NB=new NewsBO();
       return NB.GetAllNews();
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getNewsInfo")
    public NewsDTO getNewsInfo(@WebParam(name = "Id")
    String Id) throws Exception {
        NewsBO NB=new NewsBO();
       return NB.getNewInfo(Id);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getNewsByDate")
    public ArrayList<NewsDTO> getNewsByDate(@WebParam(name = "Date")
    String Date) throws Exception {
         NewsBO NB=new NewsBO();
       return NB.getNewByDate(Date);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getNewsByAuthor")
    public ArrayList<NewsDTO> getNewsByAuthor(@WebParam(name = "Author")
    String Author) throws Exception {
         NewsBO NB=new NewsBO();
       return NB.getNewByAuthor(Author);
    }

}
